<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <base href="#(basePath)"/>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link charset="utf-8" rel="stylesheet" type="text/css" href="/static/ali/ali.css" />
    <link charset="utf-8" rel="stylesheet" type="text/css" href="/static/ali/single.css" />
    <title>友利钱包账户中心</title>
</head>
<body>
<header>
    <div class="header-wrapper">
        <div class="welcome">
            <a>商家:#(seller.name)</a>
        </div>
        <div class="accounts">
            <a>付款方:#(order.payer)</a>
        </div>
    </div>
</header>
<nav>
    <div class="nav-wrapper">
        <div class="logo indexLogo">
            <img src="/static/logo.png" alt="有利钱包 / 商家中心">
        </div>
        <ul class="common-nav-items">
            <li class="common-nav-item active">
                <a><span>友利钱包</span>收银台</a>
            </li>
        </ul>
    </div>
</nav>

<div class="content">
    <div class="content-wrapper">
        <div class="casherdesk">
            <div class="conspicuous">
                <dl class="order-row">
                    <dt>收款商家信息</dt>
                    <dd>#(order.accountName) #(order.accountNo)
                       <p>#(youliAccount.province ??)
                        #(youliAccount.city ??)
                        #(youliAccount.openingBankName ??)
                        (行号:#(youliAccount.openingBankNo ??))</p>
                    </dd>
                </dl>
            </div>
            <dl class="order-row">
                <dt>买家信息</dt>
                <dd>#(order.payer) </dd>
            </dl>
            <dl class="order-row">
                <dt>付款金额</dt>
                <dd><span class="order-money">#(order.amountShow)</span></dd><br>
            </dl>

            <dl class="order-row">
                <dt>大写金额</dt>
                <dd><span class="order-money">#(order.amountInWords)</span></dd>
            </dl>
            <dl class="order-row">
                <dt>商城订单号</dt>
                <dd>#(order.outOrderNo)</dd>
            </dl>
            <dl class="order-row">
                <dt>钱包订单号</dt>
                <dd class="important">#(order.orderNo)
                    #if(order.bizType == 'charge'&& order.orderStatus != 'TS')
                    <span>重要提示：请转账时在备注或附言栏内填写该单号，以确保及时到账</span>
                    #end
                </dd>
            </dl>
            <dl class="order-row">
                <dt>备注</dt>
                <dd>#(order.goodsName)</dd>
            </dl>

            <div class="dashed-line"></div>
            <form action="" onsubmit="return false" method="post">

                <div class="btn-area">
                    <button class="jui-btn jui-btn-blue" lay-submit lay-filter="submitReview" >返回商城</button>
                </div>
            </form>
        </div>
    </div>
</div>

#include("common/footer.html")

<script src="/static/layui/layui.js"></script>
<script type="text/javascript">
    layui.config({
        version: "3.0.0",
        base: '/static/fly/mods/'
    }).extend({
        fly: 'index'
    }).use(['form', 'layer'], function(){
        var $ = layui.$, form = layui.form;

        var orderNo = '#(order.orderNo)';
        form.on("submit(submitReview)", function(data){
            var text = "请确定已经保存了打款信息！";
            layer.open({
                type: 1
                ,content: '<div style="padding: 20px 100px;">'+ text +'</div>'
                ,btn: ['确定','取消']
                ,btnAlign: 'c' //按钮居中
                ,shade: 0 //不显示遮罩
                ,yes: function(){
                    gotopay(orderNo);
                    layer.closeAll();
                }
            });
        });
        function gotopay(orderNo){
            window.location.href= "customer/casherdesk/returnPay?orderNo=" + orderNo;
        }

    });


    function setPayPassword(orderNo) {
        var userName = document.getElementById("userName").value;
        var password1 = document.getElementById("password1").value;
        var password2 = document.getElementById("password2").value;
        alert(userName + "," + password1 + "," + password2);

        if(password1.length!=6 || password2.length!=6){
            alert("密码长度错误!长度必须6位");
            return;
        }

        if(password1!=password2){
            alert("两次密码不一致!");
            return;
        }

        window.location.href="/customer/casherdesk/setPayPassword?userName=" + userName +
            "&payPassword1=" +password1 + "&&payPassword2=" +password2 + "&orderNo=" +orderNo;


    }
</script>

</body>
</html>
